# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-nmap
_pkgname=nmap
pkgver=0.6.1
pkgrel=4
pkgdesc="Python3 class to use nmap and access scan results"
options="!check" # Some tests fail due to missing file
url="http://xael.org/pages/python-nmap-en.html"
arch="noarch"
license="GPL-3.0-or-later"
depends="nmap"
makedepends="py3-setuptools"
checkdepends="py3-nose"
source="http://xael.org/pages/python-$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/python-$_pkgname-$pkgver

replaces="py-nmap" # Backwards compatibility
provides="py-nmap=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	nosetests
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="8de9ba6d0a4cecce09e82765b8a9ac77fb4368298d5a5f9ce07b7737a90def795f1ad00885fc73ec720bea2a592230e86aaca8cacd884c9299f64ad934bcee18  python-nmap-0.6.1.tar.gz"
